import { LocalizationContext, MenuItem } from "../../core";

import { ZoomMenuItemProps } from "./interface";
import ZoomOutIcon from "./ZoomOutIcon";
import { FC, useContext } from "react";

const ZoomOutMenuItem: FC<ZoomMenuItemProps> = ({ onClick }) => {
  const l10n = useContext(LocalizationContext);
  const label = l10n && l10n.zoom ? l10n.zoom.zoomOut : "Zoom out";

  return (
    <MenuItem icon={<ZoomOutIcon />} onClick={onClick}>
      {label}
    </MenuItem>
  );
};

export default ZoomOutMenuItem;
